package com.xjoyt.pay.master.vo;

public class DistributorProfit extends com.xjoyt.pay.master.po.DistributorProfit {

	public double getProfit() {
		long money = this.money == null ? 0 : this.money;
		double rate = this.rate == null ? 0 : this.rate;
		double costRate = this.costRate == null ? 0 : this.costRate;
		long poundage = this.poundage == null ? 0 : this.poundage;
		long costPoundage = this.costPoundage == null ? 0 : this.costPoundage;
		long limit = this.limit == null ? 0 : this.limit;
		long costLimit = this.costLimit == null ? 0 : this.costLimit;
		long minimum = this.minimum == null ? 0 : this.minimum;
		long costMinimum = this.costMinimum == null ? 0 : this.costMinimum;
		
		// return money * (rate - costRate) / 1000;
		return ((rate * money + limit + minimum) - (costRate * money + costLimit + costMinimum)) + (poundage - costPoundage);
	}

}
